n=0
for i in range(1,1001):
    if i%2!=0:
        continue
    else:
        print(i,end=' ')
        n+=1
        if n%3==0:
            print()
